package com.spzx.channel.controller;

import com.spzx.channel.service.ICategoryService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: CategoryController
 * Package: com.spzx.channel.controller
 * Description:
 *
 * @Author 咚咚小圆帽
 * @Create 2025/3/16 20:39
 * @Version 1.0
 */
@Tag(name = "分类页管理")
@RestController
@RequestMapping("/category")
public class CategoryController extends BaseController {
    @Autowired
    private ICategoryService categoryService;

    @Operation(summary = "获取商品分类嵌套列表")
    @GetMapping(value = "/tree")
    public AjaxResult tree() {
        return success(categoryService.tree());
    }
}
